/*******************************************************
> Copyright (C) 2024 ==IOT== All rights reserved.
> File Name: menu.c
> Author: sy
> Website:www.sy.org
> Created Time: 2024年09月23日 星期一 09时21分08秒
***************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "enroll.h"
#include "query.h"
#include "alarm.h"
#include "login.h"
#include "revise.h"
#include "man.h"
void one_menu()
{
    int num = 0;
    while (1)
    {
        printf("*******************************************************\n");
        printf("**********************欢迎进入*************************\n");
        printf("*******************************************************\n");
        printf("                      1  登录                          \n");
        printf("*******************************************************\n");
        printf("                      2  注册   	                   \n");
        printf("*******************************************************\n");
        printf("                      3 修改密码                       \n");
        printf("*******************************************************\n");
        printf("                       0 退出                          \n");
        printf("*******************************************************\n");
        printf("请输入:\n");
        scanf("%d", &num);
        switch (num)
        {
        case 1:
            Login();
            two_menu();
            break;
        case 2:
            Register();
            break;
        case 3:
            ChangePassword();
            break;
        case 0:
            break;
        }
    }
}

void two_menu()
{
    int num = 0;
    while (1)
    {
        printf("*******************************************************\n");
        printf("**********************欢迎进入*************************\n");
        printf("*******************************************************\n");
        printf("     1 查询信息                     2  报警信息         \n");
        printf("*******************************************************\n");
        printf("     3 修改设备                     4  修改员工信息      \n");
        printf("*******************************************************\n");
        printf("     5 退出                       6返回上一级菜单       \n");
        printf("*******************************************************\n");
        printf("请输入:\n");
        scanf("%d", &num);
        switch (num)
        {
        case 1:
            Query();
            break;
        case 2:
            Alarm();
            break;
        case 3:
            ModifyDevice();
            break;
        case 4:
            ModifyStaff();
            break;
        case 5:
            Quit();
            break;
        case 6:
            one_menu();
            break;
        }
    }
}
/*

void staff_menu()
{
    int num = 0;
    while (1)
    {
        printf("*******************************************************\n");
        printf("**********************欢迎进入*************************\n");
        printf("*******************************************************\n");
        printf("                      1  登录                          \n");
        printf("*******************************************************\n");
        printf("                       0 退出                          \n");
        printf("*******************************************************\n");
        printf("请输入:\n");
        scanf("%d", &num);
        switch (num)
        {
        case 1:
            Login();
            staff_tow_menu();
            break;
        case 0:
            break;
        }
    }
}

void staff_tow_menu()
{
    int num = 0;
    while (1)
    {
        printf("*******************************************************\n");
        printf("**********************欢迎进入*************************\n");
        printf("*******************************************************\n");
        printf("                       1  显示                         \n");
        printf("*******************************************************\n");
        printf("                       2 报警                          \n");
        printf("*******************************************************\n");
        printf("                       0 退出                          \n");
        printf("*******************************************************\n");
        printf("请输入:\n");
        scanf("%d", &num);
        switch (num)
        {
        case 1:
            Display();
            break;
        case 2:
            Alarm();
            break;
        case 0:
            Quit();
            break;
        }
    }
}
*/